//% import Question
//% import Answer

//% extends .Oboe.oboe.Element

function Main( tag )
{
    this.Super( tag );

    this.clear = function()
    {
        this.signalDown( "clear" );
    };
    
    this.showQuestion = function(data)
    {
        this.clear();
        this.addChild( new Question(data.question) );
        for( var i=0; i<3; ++i )
        {
            this.addChild( new Answer( i+1, data["answer" + (i+1)] ) );
        }
    };
    
    this.showQuestion({ question: "pomA", answer1: "d", answer2: "e", answer3: "f" });
}
